<!--  -->
<template>
  <div
    v-if="detailsData"
    class="detail-content"
  >
    <div class="base-info-container">
      <item-title title="基础信息" />
      <el-form
        ref="elForm"
        :model="detailsData"
        size="small"
        label-width="150px"
      >
        <el-row
          :gutter="40"
          class="form-row01"
        >
          <el-col :span="8">
            <el-form-item label="文件名称："><span>{{ detailsData.quality_standard_name }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="文件编号："><span>{{ detailsData.quality_standard_no||"无" }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="文件版本号："><span v-if="detailsData.version">V</span><span>{{ detailsData.version||"无" }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="适用范围：">
              <template v-if="detailsData.sample_type_list&&detailsData.sample_type_list.length">
                <div
                  v-for="(item, idx) in detailsData.sample_type_list"
                  :key="idx"
                  style="display: inline-block;"
                >
                  <span>{{ item.sample_type_value }}</span>
                  <span v-if="idx <detailsData.sample_type_list.length-1">，</span>
                </div>
              </template>

              <div v-else>无</div>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="文件类型："><span>{{ detailsData.quality_type_name }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="文件来源："><span>{{ detailsData.quality_source_name }}</span></el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="项目名称："><span>{{ detailsData.project_name||"无" }}</span></el-form-item>
          </el-col>
          <el-col
            v-if="detailsData&&detailsData.change_description"
            :span="8"
          >
            <el-form-item label="变更原因："><span>{{ detailsData.change_description||"无" }}</span></el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="10">
          <el-form-item label="检验依据文件附件：">
            <file-preview :file-list="detailsData.file" />
          </el-form-item>
        </el-row>
      </el-form>
    </div>

  </div>
</template>

<script>
export default {
  props: {
    detailsData: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {}
  },
  // 生命周期 - 创建完成（访问当前this实例）
  created() {},
  methods: {}
}
</script>
<style scoped>
/* @import url(); 引入css类 */
</style>
